//
//  MessageModel.swift
//  jiahui
//
//  Created by 3tee on 2024/12/20.
//

import Foundation
import WCDB

final class MessageModel: TableCodable {

    var userid : String = ""//消息发生id
    var fromName : String = ""//消息发生id
    var content: String = ""//消息内容
    var msgTime: Int64 = 0//消息发生事件
    var key: String = ""
    enum CodingKeys: String,CodingTableKey{
        typealias Root = MessageModel
        case userid
        case content
        case msgTime
        case fromName
        case key
        static var objectRelationalMapping: WCDB.TableBinding<MessageModel.CodingKeys> = TableBinding(CodingKeys.self){
            BindColumnConstraint(key, isPrimary: true, isAutoIncrement: false)
        }
        //主键、唯一、不为null、默认值等的列约束。它是可选的。
         
        
   
    }
    
}
